home *** CD-ROM | disk | FTP | other *** search
/ Aminet 12 / Aminet 12 (1996)(GTI - Schatztruhe)[!][Jun 1996].iso / Aminet / dev / e / eiffel.lha / flc / source / ame.e < prev    next >
Encoding:
Text File  |  1995-12-27  |  3.3 KB  |  76 lines

  1.  
  2. -> Copyright © 1995, Guichard Damien.
  3.  
  4. -> AME (Abstract Machine for Eiffel)
  5. -> It has been designed to:
  6. ->  _ be machine and architecture (RISC/CISC) independant for portability
  7. ->  _ allow use of all addressing modes and registers of its target
  8. ->    processor for efficiency
  9. ->  _ not be affected by adding or removing or changing the technique of
  10. ->    garbage collection
  11. -> This  goal  is achieved in AME firstly by making no other assumption about
  12. -> the  target  processor  than the fact that it owns several registers and a
  13. -> stack,  secondly  all  addressing  modes  used in AME are much Eiffel-like
  14. -> (ATTRIBUT,   LOCAL,ROUTINE,ARGUMENT,CURRENT   object)   and  can  ever  be
  15. -> translated  to  the  best  available  addressing  modes  by  the  back-end
  16. -> generator.
  17. -> see documentation for more information about AME
  18.  
  19. OPT MODULE
  20. OPT EXPORT
  21.  
  22. -> AME addressing modes reflect Eiffel language entities
  23.  
  24. ENUM M_TRUE,        -> true value
  25.      M_FALSE,       -> false value
  26.      M_VOID,        -> Void value
  27.      M_STRING,      -> an Eiffel string
  28.      M_CURRENT,     -> access to current object
  29.      M_IMMEDIATE,   -> a LONG immediate value
  30.      M_REGISTER,    -> a p-code register
  31.      M_ATTRIBUT,    -> access to current object attribut
  32.      M_ARG,         -> access to current routine argument
  33.      M_LOCAL,       -> access to a local variable
  34.      M_ROUTINE,     -> access to a current object routine
  35.      M_LABEL,       -> a label number from to
  36.      M_NONE         -> no access mode
  37.  
  38. CONST R_NONE=-1
  39.  
  40. -> AME mnemonics definition
  41. ENUM I_ADD,         -> performs destination + source
  42.      I_AND,         -> performs destination AND source
  43.      I_ASSIGN,      -> copy the destination to the source
  44.      I_CALL,        -> procedure call,mode is M_LABEL,dest is R_NONE
  45.      I_CLASSFIELDS, -> number of class fields
  46.      I_CREATE,      -> object creation, mode is M_CLASS
  47.      I_CURRENT,     -> set current object
  48.      I_DIV,         -> performs destination / source
  49.      I_ENDROUTINE,  -> restore old SP and frame register, and returns
  50.      I_EQUAL,       -> performs destination = source
  51.      I_GREATERTHAN, -> performs destination > source
  52.      I_JALWAYS,     -> unconditionnal JUMP, mode is M_LABEL
  53.      I_JFALSE,      -> JUMP if last result is FALSE, mode is M_LABEL
  54.      I_JTRUE,       -> JUMP if last result is TRUE,  mode is M_LABEL
  55.      I_LABEL,       -> LABEL declaration, mode is M_LABEL
  56.      I_LESSTHAN,    -> performs destination < source
  57.      I_LINK,        -> dynamic binding table vector
  58.      I_LOCALS,      -> define local entities
  59.      I_MOD,         -> performs destination MODULO source
  60.      I_MUL,         -> performs destination * source
  61.      I_NEG,         -> performs -destination
  62.      I_NOT,         -> performs ~destination
  63.      I_NOTEQUAL,    -> performs destination <> source
  64.      I_NOTGREATER,  -> performs destination <= source
  65.      I_NOTLESS,     -> performs destination >= source
  66.      I_OR,          -> performs destination OR source
  67.      I_POPREGS,     -> pop i regs from stack
  68.      I_PUSH,        -> push source to stack
  69.      I_PUSHREGS,    -> push i regs to stack
  70.      I_ROUTINE,     -> push frame register and set it to SP value
  71.      I_SUB,         -> performs destination - source
  72.      I_TABLE,       -> jump table
  73.      I_XOR,         -> performs destination XOR source
  74.      I_NONE         -> no instruction
  75.  
  76.